package handler

import (
	"jx3_bot/common"

	"github.com/tidwall/gjson"
)

func ServerCheckHandle() {
	url := "https://www.jx3api.com/data/server/check?server=" + "梦江南"
	resp, _ := common.HttpGet(url)
	if gjson.Get(resp, "data.status").Index == 1 {
		zone := gjson.Get(resp, "data.zone").String()
		server := gjson.Get(resp, "data.server").String()
		msg := zone + "-" + server + " 开服啦~"
		common.SendGroupMessage("", msg, true)
	}

}
